#ifndef __PROTOCOLPARSER_H__
#define __PROTOCOLPARSER_H__

#include "../Dict/Chcommander.h"
#include "../Dict/EnRecommander.h"
#include "../Dict/Recommander.h"
#include "../WebPageQuery.h"
#include "../Mylogger.h"
#include <nlohmann/json.hpp>
#include <string>
using std::string;
using json = nlohmann::json;

class Chcommander;

class EnRecommander;

class Recommander;

class ProtocolParser
{
public:
    ProtocolParser(const string &msg);
    //消息处理
    string doParse();

    //将要发送的消息打包成json格式
    string jsonMsgPack(const string &msgId,const string &msg);

private:
    bool isEnglish(const string &msg);
    bool notIncludeEnglish(const string &msg);

private:
    string _msg;
};

#endif


